//
//  NEDPopBaseView.h
//  MoreCoin
//
//  Created by 林宁宁 on 2019/9/23.
//  Copyright © 2019 MoreCoin. All rights reserved.
//

#import <NEDBase/NEDBaseView.h>
#import <NEDConstant/NEDConstant.h>

NS_ASSUME_NONNULL_BEGIN

@protocol NEDPopBaseViewDelegate <NSObject>

- (void)ned_setupUI;
- (void)ned_setupData;
- (void)ned_popShowAnimation;
- (void)ned_popShowFinish;
- (void)ned_popShowWillFinish;
- (void)ned_popDismissAnimation;

- (void)ned_tapBgEvent;

@end

@interface NEDPopBaseView : NEDBaseView<NEDPopBaseViewDelegate>

@property (retain, nonatomic) UIView * contentView;
@property (retain, nonatomic) UIButton * closeBtn;

/// 铺满整个其父视图的 背景视图
@property (retain, nonatomic, readonly) UIView * backgroundView;

@property (copy, nonatomic) void(^didShowBlock)(void);
@property (copy, nonatomic) void(^didCloseBlock)(void);
@property (copy, nonatomic) void(^clickCloseBlock)(void);//点击关闭按钮

/// 将要显示
@property (copy, nonatomic) void(^willAppearShow)(void);
/// 背景视图显示完成
@property (copy, nonatomic) void(^backgroundViewDidShow)(void);

/** 点击 背景关闭 默认YES*/
@property (assign, nonatomic) BOOL tapBackgroundToClose;

//是否显示毛玻璃 默认NO
@property (assign, nonatomic) BOOL isBlurShow;
@property (assign, nonatomic) BOOL popFromBottom;

/// 一直长留 在cleanPopView中不清理
@property (assign, nonatomic) BOOL isAlwaysStay;

/// 右上角独立于contentView的关闭按钮
- (void)addCloseBtn:(NEDVoidBlock)action closeImage:(UIImage * _Nullable)closeImage;

- (void)popShow;
- (void)popShowAtView:(UIView * _Nullable)aimView;
- (void)popDismiss;

+ (void)cleanPopView;

//+ (void)show;

@end

NS_ASSUME_NONNULL_END
